package cn.edu.ctgu.junitTest;
/**
 * @Title: Triangle.java
 * @Package cn.edu.ctgu.junitTest
 * @Description: 测试三角形是否为等边、等腰或者是不等边三角形，或不是三角形
 * @author 买买提沙答木·托呼吐尔
 * @version V1.0
 * @Date 2023-3-14
 */
public class Triangle {
    public static String classify(int a, int b, int c) {
        if (a <= 0 || b <= 0 || c <= 0) {
            return "Invalid";
        }

        if (a + b <= c || a + c <= b || b + c <= a) {
            return "Invalid";
        }

        if (a == b && b == c) {
            return "Equilateral";
        }

        if (a == b || b == c || a == c) {
            return "Isosceles";
        }

        return "Scalene";
    }
}
